﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:System="clr-namespace:System;assembly=mscorlib">

    <!-- fugging Scrollbars -->
    <ControlTemplate x:Key="HorizontalScrollBar" TargetType="{x:Type ScrollBar}">
        <Grid x:Name="Root">
            <Grid.Resources>
                <ControlTemplate x:Key="RepeatButtonTemplate" TargetType="RepeatButton">
                    <Grid x:Name="Root" Background="Transparent">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                    </Grid>
                </ControlTemplate>
                <ControlTemplate x:Key="HorizontalIncrementTemplate" TargetType="RepeatButton">
                    <Grid x:Name="Root">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)"
                                                                       Storyboard.TargetName="HoverPath">
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)"
                                                                       Storyboard.TargetName="Blur">
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="0.5" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard />
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)"
                                                                       Storyboard.TargetName="Root">
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="0.5" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Path Data="F1 M 511.047,352.682L 511.047,342.252L 517.145,347.467L 511.047,352.682 Z "
                              Height="6" Stretch="Uniform" Width="4">
                            <Path.Fill>
                                <SolidColorBrush Color="{DynamicResource Gray2}" />
                            </Path.Fill>
                        </Path>
                        <Path x:Name="HoverPath"
                              Data="F1 M 511.047,352.682L 511.047,342.252L 517.145,347.467L 511.047,352.682 Z "
                              Height="6" Stretch="Uniform" Width="4" UseLayoutRounding="False"
                              Opacity="0" Margin="1,1,0,0">
                            <Path.Fill>
                                <SolidColorBrush Color="{DynamicResource Black1}" />
                            </Path.Fill>
                        </Path>
                        <Path x:Name="Blur"
                              Data="F1 M 511.047,352.682L 511.047,342.252L 517.145,347.467L 511.047,352.682 Z "
                              Height="6" Stretch="Uniform" Width="4" UseLayoutRounding="False" Opacity="0"
                              Margin="1,1,0,0">
                            <Path.Effect>
                                <BlurEffect />
                            </Path.Effect>
                            <Path.Fill>
                                <SolidColorBrush Color="{DynamicResource Black1}" />
                            </Path.Fill>
                        </Path>
                        <Rectangle x:Name="DisabledElement" Fill="{DynamicResource WhiteBrush}"
                                   Opacity="0" RadiusY="2" RadiusX="2" />
                    </Grid>
                </ControlTemplate>
                <ControlTemplate x:Key="HorizontalDecrementTemplate" TargetType="RepeatButton">
                    <Grid x:Name="Root">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)"
                                                                       Storyboard.TargetName="HoverPath">
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)"
                                                                       Storyboard.TargetName="Blur">
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="0.5" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard />
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)"
                                                                       Storyboard.TargetName="Root">
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="0.5" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Path Data="F1 M 110.692,342.252L 110.692,352.682L 104.594,347.467L 110.692,342.252 Z "
                              Height="6" Stretch="Uniform" Width="4">
                            <Path.Fill>
                                <SolidColorBrush Color="{DynamicResource Gray2}" />
                            </Path.Fill>
                        </Path>
                        <Path x:Name="HoverPath"
                              Data="F1 M 110.692,342.252L 110.692,352.682L 104.594,347.467L 110.692,342.252 Z "
                              Height="6" Stretch="Uniform" Width="4" UseLayoutRounding="False"
                              Opacity="0" Margin="0,1,0,0">
                            <Path.Fill>
                                <SolidColorBrush Color="{DynamicResource Black1}" />
                            </Path.Fill>
                        </Path>
                        <Path x:Name="Blur"
                              Data="F1 M 110.692,342.252L 110.692,352.682L 104.594,347.467L 110.692,342.252 Z "
                              Height="6" Stretch="Uniform" Width="4" UseLayoutRounding="False" Opacity="0"
                              Margin="0,1,0,0">
                            <Path.Effect>
                                <BlurEffect />
                            </Path.Effect>
                            <Path.Fill>
                                <SolidColorBrush Color="{DynamicResource Black1}" />
                            </Path.Fill>
                        </Path>
                    </Grid>
                </ControlTemplate>
                <ControlTemplate x:Key="HorizontalThumbTemplate" TargetType="Thumb">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)"
                                                                       Storyboard.TargetName="MouseOverRectangle">
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)"
                                                                       Storyboard.TargetName="PressedRectangle">
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity"
                                                                       Storyboard.TargetName="ThumbVisual">
                                            <SplineDoubleKeyFrame KeyTime="0:0:0" Value="0" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid x:Name="ThumbVisual" Margin="0,1,0,1">
                            <Rectangle x:Name="Background" StrokeThickness="1" Fill="{DynamicResource ThumbBrush}" />
                            <Rectangle x:Name="MouseOverRectangle" StrokeThickness="1" Opacity="0"
                                       Fill="{DynamicResource BlackBrush}" />
                            <Rectangle x:Name="PressedRectangle" StrokeThickness="1" Opacity="0"
                                       Fill="{DynamicResource BlackBrush}" />
                        </Grid>
                    </Grid>
                </ControlTemplate>
            </Grid.Resources>
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Normal" />
                    <VisualState x:Name="MouseOver" />
                    <VisualState x:Name="Disabled">
                        <Storyboard>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity"
                                                           Storyboard.TargetName="Root">
                                <SplineDoubleKeyFrame KeyTime="0" Value="0.5" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid x:Name="HorizontalRoot" Height="11">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <Border BorderThickness="0,0,0,1" Grid.RowSpan="1" Margin="0,0,0,-1" Grid.ColumnSpan="5"
                        Visibility="Collapsed">
                    <Border.BorderBrush>
                        <SolidColorBrush Color="{DynamicResource Gray4}" />
                    </Border.BorderBrush>
                </Border>
                <RepeatButton x:Name="HorizontalSmallDecrease"  Command="ScrollBar.LineLeftCommand"
                              Width="16" IsTabStop="False" Interval="50" Margin="1" Grid.Column="0"
                              Template="{DynamicResource HorizontalDecrementTemplate}" />
                <Track x:Name="PART_Track" MinWidth="60" IsDirectionReversed="False" Grid.Column="1">
                    <Track.Resources>
                        <System:Double x:Key="{x:Static SystemParameters.VerticalScrollBarButtonHeightKey}">
                            100
                        </System:Double>
                    </Track.Resources>
                    <Track.DecreaseRepeatButton>
                        <RepeatButton x:Name="HorizontalLargeDecrease" Command="ScrollBar.PageLeftCommand"
                                      IsTabStop="False" Interval="50"
                                      Template="{DynamicResource RepeatButtonTemplate}" />
                    </Track.DecreaseRepeatButton>
                    <Track.Thumb>
                        <Thumb MinWidth="60" Template="{DynamicResource HorizontalThumbTemplate}" />
                    </Track.Thumb>
                    <Track.IncreaseRepeatButton>
                        <RepeatButton x:Name="HorizontalLargeIncrease" Command="ScrollBar.PageRightCommand"
                                      IsTabStop="False" Interval="50" Template="{DynamicResource RepeatButtonTemplate}" />
                    </Track.IncreaseRepeatButton>
                </Track>
                <RepeatButton x:Name="HorizontalSmallIncrease" Command="ScrollBar.LineRightCommand"
                              Width="16" IsTabStop="False" Interval="50" Margin="1" Grid.Column="2"
                              Template="{DynamicResource HorizontalIncrementTemplate}" />
            </Grid>
        </Grid>
    </ControlTemplate>
    <ControlTemplate x:Key="VerticalScrollBar" TargetType="{x:Type ScrollBar}">
        <Grid x:Name="Root">
            <Grid.Resources>
                <ControlTemplate x:Key="RepeatButtonTemplate" TargetType="RepeatButton">
                    <Grid x:Name="Root" Background="Transparent">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                    </Grid>
                </ControlTemplate>
                <ControlTemplate x:Key="VerticalIncrementTemplate" TargetType="RepeatButton">
                    <Grid x:Name="Root">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)"
                                                                       Storyboard.TargetName="HoverPath">
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)"
                                                                       Storyboard.TargetName="Blur">
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="0.5" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard />
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)"
                                                                       Storyboard.TargetName="Root">
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="0.5" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Path Data="F1 M 531.107,321.943L 541.537,321.943L 536.322,328.042L 531.107,321.943 Z "
                              Height="4" Stretch="Uniform" Width="6">
                            <Path.Fill>
                                <SolidColorBrush x:Name="ButtonColor" Color="{DynamicResource Gray3}" />
                            </Path.Fill>
                        </Path>
                        <Path x:Name="HoverPath"
                              Data="F1 M 531.107,321.943L 541.537,321.943L 536.322,328.042L 531.107,321.943 Z "
                              Height="4" Stretch="Uniform" Width="6" UseLayoutRounding="False" Opacity="0"
                              Margin="1,0,0,0">
                            <Path.Fill>
                                <SolidColorBrush Color="{DynamicResource Black1}" />
                            </Path.Fill>
                        </Path>
                        <Path x:Name="Blur"
                              Data="F1 M 531.107,321.943L 541.537,321.943L 536.322,328.042L 531.107,321.943 Z "
                              Height="4" Stretch="Uniform" Width="6" UseLayoutRounding="False"
                              Opacity="0" Margin="1,0,0,0">
                            <Path.Effect>
                                <BlurEffect />
                            </Path.Effect>
                            <Path.Fill>
                                <SolidColorBrush Color="{DynamicResource Black1}" />
                            </Path.Fill>
                        </Path>
                        <Rectangle x:Name="DisabledElement" Fill="{DynamicResource WhiteBrush}" Opacity="0"
                                   RadiusY="2" RadiusX="2" />
                    </Grid>
                </ControlTemplate>
                <ControlTemplate x:Key="VerticalDecrementTemplate" TargetType="RepeatButton">
                    <Grid x:Name="Root">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)"
                                                                       Storyboard.TargetName="HoverPath">
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)"
                                                                       Storyboard.TargetName="Blur">
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="0.5" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard />
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)"
                                                                       Storyboard.TargetName="Root">
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="0.5" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Rectangle x:Name="Background" Fill="{DynamicResource ControlBackgroundBrush}"
                                   Opacity="0" RadiusY="2" RadiusX="2" StrokeThickness="1" />
                        <Rectangle x:Name="BackgroundMouseOver" Fill="{DynamicResource HighlightBrush}"
                                   Opacity="0" RadiusY="2" RadiusX="2" />
                        <Rectangle x:Name="BackgroundPressed" Fill="{DynamicResource HighlightBrush}"
                                   Opacity="0" RadiusY="2" RadiusX="2" />
                        <Rectangle x:Name="BackgroundGradient" Fill="{DynamicResource TransparentWhiteBrush}"
                                   Margin="1" Opacity="0" RadiusY="1" RadiusX="1" Stroke="{DynamicResource ControlBackgroundBrush}"
                                   StrokeThickness="1" />
                        <Rectangle x:Name="Highlight" IsHitTestVisible="false" Margin="1" Opacity="0"
                                   RadiusY="1" RadiusX="1" Stroke="{DynamicResource HighlightBrush}" StrokeThickness="1" />
                        <Path Data="F1 M 541.537,173.589L 531.107,173.589L 536.322,167.49L 541.537,173.589 Z "
                              Height="4" Stretch="Uniform" Width="6">
                            <Path.Fill>
                                <SolidColorBrush Color="{DynamicResource Gray2}" />
                            </Path.Fill>
                        </Path>
                        <Path x:Name="HoverPath" Data="F1 M 541.537,173.589L 531.107,173.589L 536.322,167.49L 541.537,173.589 Z "
                              Height="4" Stretch="Uniform" Width="6" UseLayoutRounding="False" Opacity="0"
                              Margin="1,0,0,0">
                            <Path.Fill>
                                <SolidColorBrush Color="{DynamicResource Black1}" />
                            </Path.Fill>
                        </Path>
                        <Path x:Name="Blur" Data="F1 M 541.537,173.589L 531.107,173.589L 536.322,167.49L 541.537,173.589 Z "
                              Height="4" Stretch="Uniform" Width="6" UseLayoutRounding="False" Opacity="0"
                              Margin="1,0,0,0">
                            <Path.Effect>
                                <BlurEffect />
                            </Path.Effect>
                            <Path.Fill>
                                <SolidColorBrush Color="{DynamicResource Black1}" />
                            </Path.Fill>
                        </Path>
                    </Grid>
                </ControlTemplate>
                <ControlTemplate x:Key="VerticalThumbTemplate" TargetType="Thumb">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)"
                                                                       Storyboard.TargetName="MouseOverRectangle">
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="1" />
                                        </DoubleAnimationUsingKeyFrames>

                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)"
                                                                       Storyboard.TargetName="PressedRectangle">
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity"
                                                                       Storyboard.TargetName="ThumbVisual">
                                            <SplineDoubleKeyFrame KeyTime="0:0:0" Value="0" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid x:Name="ThumbVisual" Margin="1,0,1,0">
                            <Rectangle x:Name="Background" StrokeThickness="1" Fill="{DynamicResource ThumbBrush}" />
                            <Rectangle x:Name="MouseOverRectangle" StrokeThickness="1"
                                       Opacity="0" Fill="{DynamicResource BlackBrush}" />
                            <Rectangle x:Name="PressedRectangle" StrokeThickness="1"
                                       Opacity="0" Fill="{DynamicResource BlackBrush}" />
                        </Grid>
                    </Grid>
                </ControlTemplate>
            </Grid.Resources>
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Normal" />
                    <VisualState x:Name="MouseOver" />
                    <VisualState x:Name="Disabled">
                        <Storyboard>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Root">
                                <SplineDoubleKeyFrame KeyTime="0" Value="0.5" />
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid x:Name="VerticalRoot"
                  Width="11">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="*" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <Border BorderThickness="0,0,1,0" Margin="0,0,-1,0" Grid.RowSpan="5" Visibility="Collapsed">
                    <Border.BorderBrush>
                        <SolidColorBrush Color="{DynamicResource Gray4}" />
                    </Border.BorderBrush>
                </Border>
                <RepeatButton x:Name="VerticalSmallDecrease" Command="ScrollBar.LineUpCommand" Height="16"
                              IsTabStop="False" Interval="50" Margin="1"
                              Grid.Row="0" Template="{DynamicResource VerticalDecrementTemplate}" />
                <Track x:Name="PART_Track" MinHeight="60" IsDirectionReversed="true" Grid.Row="1">
                    <Track.Resources>
                        <System:Double x:Key="{x:Static SystemParameters.VerticalScrollBarButtonHeightKey}">
                            100
                        </System:Double>
                    </Track.Resources>
                    <Track.DecreaseRepeatButton>
                        <RepeatButton x:Name="VerticalLargeDecrease" Command="ScrollBar.PageUpCommand"
                                      IsTabStop="False" Interval="50" Template="{DynamicResource RepeatButtonTemplate}" />
                    </Track.DecreaseRepeatButton>
                    <Track.Thumb>
                        <Thumb MinHeight="60"
                               Template="{DynamicResource VerticalThumbTemplate}" />
                    </Track.Thumb>
                    <Track.IncreaseRepeatButton>
                        <RepeatButton x:Name="VerticalLargeIncrease" Command="ScrollBar.PageDownCommand"
                                      IsTabStop="False" Interval="50"
                                      Template="{DynamicResource RepeatButtonTemplate}" />
                    </Track.IncreaseRepeatButton>
                </Track>
                <RepeatButton x:Name="VerticalSmallIncrease" Command="ScrollBar.LineDownCommand"
                              Height="16" IsTabStop="False" Interval="50" Margin="1"
                              Grid.Row="2" Template="{DynamicResource VerticalIncrementTemplate}" />
            </Grid>
        </Grid>
    </ControlTemplate>

    <!-- Style for overall  ScrollBar -->
    <Style x:Key="{x:Type ScrollBar}" TargetType="{x:Type ScrollBar}">
        <Setter Property="SnapsToDevicePixels" Value="True" />
        <Setter Property="OverridesDefaultStyle" Value="true" />
        <Style.Triggers>
            <Trigger Property="Orientation" Value="Horizontal">
                <Setter Property="Width" Value="Auto" />
                <Setter Property="Height" Value="12" />
                <Setter Property="Template" Value="{DynamicResource HorizontalScrollBar}" />
            </Trigger>
            <Trigger Property="Orientation" Value="Vertical">
                <Setter Property="Width" Value="12" />
                <Setter Property="Height" Value="Auto" />
                <Setter Property="Template" Value="{DynamicResource VerticalScrollBar}" />
            </Trigger>
        </Style.Triggers>
    </Style>
</ResourceDictionary>